#! /usr/bin/python
#coding:utf-8
#利用smtplib模块,通过routon邮箱认证后，发送邮件！


import smtplib
mail_server='mail.routon.com'
mail_port = 25
from_addr='guoletao@routon.com'
password='201401'
to_addr='get_shell@foxmail.com'


#from_header='From : %s\r\n' % from_addr
from_header='From test'
to_header='To : %s\r\n' % to_addr
subject_header='Subject: test...!!!!'


body='This is a test email'

email_message='%s\n%s\n%s\n%s\n' % (from_header,to_header,subject_header,body)


s=smtplib.SMTP(mail_server,mail_port)
s.login(from_addr,password)
s.sendmail(from_addr,to_addr,email_message)
s.quit()
